from django.db import models

# Create your models here.
class Testmodel(models.Model):
    name=models.CharField(max_length=30)
    sjname=models.CharField(max_length=30)
    question=models.CharField(max_length=300)
    tscore=models.IntegerField(default=0)
    createtime=models.DateTimeField(auto_now = True)
    class Meta:
        db_table = 'Test'

class Kaoshi(models.Model):
    name=models.CharField(max_length=30)
    classbj=models.CharField(max_length=30,null=True)
    phone=models.CharField(max_length=30,null=True)
    createtime = models.DateTimeField(auto_now=True,null=True)
    question = models.CharField(max_length=300)
    tscore = models.IntegerField(default=-1)
    testid = models.ForeignKey(to='Testmodel',on_delete=models.CASCADE)
    class Meta:
        db_table = 'Kaoshi'
